//Arnold Baghomian
//homework5
//baghomia.onid@oregonstate.edu
//CS362 assignment 3


#include "dominion.h"
#include "dominion_helpers.h"
#include "rngs.h"
#include <stdio.h>
#include <math.h>
#include <stdlib.h>


void testgetCost() {
    typedef int bool;
    #define true 1
    #define false 0

    int cost;
    bool pass = true;
    for (int cardNumber = 0; cardNumber < 27; cardNumber++ )
    {
    cost = getCost(cardNumber);

    switch( cardNumber ) 
    {
    case curse:
      pass = pass && cost == 0;
      break;
    case estate:
      pass = pass && cost == 2;
      break;
    case duchy:
      pass = pass && cost == 5;
      break;
    case province:
      pass = pass && cost == 8;
      break;
    case copper:
      pass = pass && cost == 0;
      break;
    case silver:
      pass = pass && cost == 3;
      break;
    case gold:
      pass = pass && cost == 6;
      break;
    case adventurer:
      pass = pass && cost == 6;
      break;
    case council_room:
      pass = pass && cost == 5;
      break;
    case feast:
      pass = pass && cost == 4;
      break;
    case gardens:
      pass = pass && cost == 4;
      break;
    case mine:
      pass = pass && cost == 5;
      break;
    case remodel:
      pass = pass && cost == 4;
      break;
    case smithy:
      pass = pass && cost == 4;
      break;
    case village:
      pass = pass && cost == 3;
      break;
    case baron:
      pass = pass && cost == 4;
      break;
    case great_hall:
      pass = pass && cost == 3;
      break;
    case minion:
      pass = pass && cost == 5;
      break;
    case steward:
      pass = pass && cost == 3;
      break;
    case tribute:
      pass = pass && cost == 5;
      break;
    case ambassador:
      pass = pass && cost == 3;
      break;
    case cutpurse:
      pass = pass && cost == 4;
      break;
    case embargo: 
      pass = pass && cost == 2;
      break;
    case outpost:
      pass = pass && cost == 5;
      break;
    case salvager:
      pass = pass && cost == 4;
      break;
    case sea_hag:
      pass = pass && cost == 4;
      break;
    case treasure_map:
      pass = pass && cost == 4;
      break;
    }
    }
  if (pass)
         printf("getCost(): PASS all cards\n");  
  else
         printf("getCost(): FAIL all cards\n");  
}

int main(int argc, char *argv[])
{
    testgetCost();
    return 0;
}


 